﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpReview
{
    class Vehicle
    {
        public string vehicleName { get; set; }

        public void CarryPassange()
        {
            Console.WriteLine($"{vehicleName} carry passange.");
        }
    }

    class Plane : Vehicle, IFlyable
    {
        public Plane(string type = "plane")
        {
            base.vehicleName = type;
        }

        public void Fly()
        {
            Console.WriteLine($"{this.vehicleName} fly。");
        }

        public void Land()
        {
            Console.WriteLine($"{this.vehicleName} Land。");
        }

        public void TakeOff()
        {
            Console.WriteLine($"{this.vehicleName} TakeOff。");
        }
    }
}
